$(document).ready(function(){
//		var $rongMH_TT = $(window).width();
//		var $caoMH_TT = $(window).height();
//		var $rongTT = $(window).width()*70/100;
		var $caoTT = $(window).width()/25;
		var $vitriTT = $(window).width()*15/100;
		var $caoBtuongTT = $(window).width()/8;
		
		$('.linkTT').css({'margin-top': $caoTT + 'px'});
		$('.bieutuongTT').css({'height': $caoBtuongTT + 'px', 'margin-left':-$vitriTT+'px',
			'margin-right':-$vitriTT+'px'});
		$('.bieutuongTT IMG').css({'width': '100%'});
		$('.slideShowTT').css({'height': $caoBtuongTT*3.3 + 'px', 'top': -$caoBtuongTT/7 + 'px'});
});

function slideImageTT(){
	var $active = $('.slideShowTT IMG.active');
	if($active.length == 0){
		$active = $('.slideShowTT IMG:last');
	}
	
	var $next;
	if($active.next().length == false){
		$next = $('.slideShowTT IMG:first');
	}else{
		$next = $active.next();
	}
	
	$active.addClass('last-active');
	
	$next.css({opacity: 0.0}).addClass('active')
		.animate({opacity: 1.0}, 2000, function(){
			$active.removeClass('active last-active');
		});
	
}

$(function(){
	setInterval('slideImageTT()', 3000);
});